package com.itheima;

import java.util.Scanner;

public class MoveOperation {
    private Move[] moves;

    public MoveOperation(Move[] moves){
        this.moves = moves;
    }

    public void printInfo(){
        for (Move move : moves) {
            System.out.println("id="+move.getId()+",name="+move.getName()+",price="+move.getPrice());
        }
    }

    public void findById(int id){
        for (Move move : moves){
            if (move.getId() == id){
                System.out.println("id="+move.getId()+"name="+move.getName()+"price="+move.getPrice());
                return;
            }
        }
        System.out.println("没有找到");
    }
}
